package com.ruoyi.web.pojo.dto.devicedata;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @desc  温度统计数据
 * @author fwx 2024/2/28 13:56
 **/
@Data
public class PropertyTempCount {

    @ApiModelProperty(value = "活动积温")
    private Double accumulated;

    @ApiModelProperty(value = "有效积温")
    private Double effective;

    @ApiModelProperty(value = "年高温持续天数")
    private Long highDuration;

    @ApiModelProperty(value = "年霜冻持续天数")
    private Long frostDuration;

    @ApiModelProperty(value = "年霜冻持续时间")
    private Double frostDurationTime;

    public void setAccumulated(Double accumulated) {
        if(accumulated != null){
            accumulated =  Math.round(accumulated * 10) / 10.0;;
            this.accumulated = accumulated;
        }
    }

    public void setEffective(Double effective) {
        if(effective != null){
            effective =  Math.round(effective * 10) / 10.0;;
            this.effective = effective;
        }
    }
}
